<template>
	<view class="" style="display: flex;flex-direction: column;position: sticky;left: 0;top: 0;z-index: 9;">
		<view class="status_bar" style="z-index: 99;"></view>
		<view class="nav_bar">
			<view class="close1" @click="navBack(backUrl)" style="width: 44rpx;height: 44rpx;">
				<image src="@/static/other/back.png" mode="" style="width: 44rpx;height: 44rpx;"></image>
			</view>
			<view class="title_text">
				{{ titleName }}
				<span style="color: #296BEF;margin-left: 20rpx;">{{ message_group }}</span>
			</view>
			<view class="option">
				<!-- <image src="../../static/login/login_more.png" mode="" style="width: 44rpx;height: 44rpx;"></image> -->
			</view>
		</view>
		<!-- <view class="" style="width: 750rpx;height: 1rpx;background-color: transparent;">
				
			</view> -->
	</view>
</template>

<script>
	export default {
		name: "navBar",
		props: {
			titleName: {
				type: String,
				default: ''
			},
			backUrl: {
				type: String,
				default: ''
			},
			message_group: {
				type: String,
				default: ''
			},
			titleStyle: {
				type: [Object, String],
				default: ''
			},
		},
		data() {
			return {

			};
		},

		methods: {
			navBack(backUrl) {
				if (backUrl == '') return
				if (backUrl == '/') {
					uni.switchTab({
						url: '/pages/index/index1'
					})
					return
				}
				if (backUrl == 'back') {
					uni.navigateBack(1)
					return
				}
				if (backUrl == '/pages/index/index1' || backUrl == '/pages/me/index') {
					uni.switchTab({
						url: backUrl
					})
					return
				} else {
					uni.navigateTo({
						url: backUrl
					})
					return
				}

			}
		}
	}
</script>

<style lang="scss" scoped>
	.nav_bar {
		width: 750rpx;
		height: 88rpx;
		background: #FFFFFF;
		box-shadow: 0rpx 3rpx 6rpx 1rpx rgba(0, 0, 0, 0.03);
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 0 20rpx;
		box-sizing: border-box;
		position: sticky;
		top: 0;
		left: 0;
		z-index: 20;
	}

	.title_text {
		font-size: 36rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 400;
		color: #333333;
		line-height: 36rpx;
	}
</style>